<section ng-controller="navbarController as vm">
    <!-- <div class="navbar navbar-default navbar-static-top" role="navigation">
        <div class="navbar-header">
            <a class="navbar-brand">ACM-Merchant</a>
        </div>
        <ul class="nav navbar-nav">
            <li ng-repeat="menu in vm.menus track by $index">
                <a ui-sref="acm.{{menu.state}}">{{menu.displayName}}</a>
            </li>
        </ul>
    </div> -->

    <nav class="navbar navbar-inverse">
        <div class="container-fluid">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <span class="navbar-brand">O2O[C]</span>
            </div>
        
            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                    <li ng-repeat="menu in vm.menus track by $index">
                        <a ui-sref="o2o_c.{{menu.state}}">{{menu.displayName}}</a>
                    </li>
                </ul>
        
                <ul class="nav navbar-nav navbar-right">
                    <li ng-show="globalData.canSearch" id="search-dtype" class="dropdown" data-index="0">
                        <a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                            {{ vm.getDishType() }}&nbsp;<span class="caret"></span>
                        </a>
                        <ul class="dropdown-menu">
                            <li ng-repeat="dishType in vm.dishTypes track by $index">
                                <a href="javascript:;" ng-click="vm.search.type=$index">{{ dishType }}</a>
                            </li>
                        </ul>
                    </li>
                    <li ng-show="globalData.canSearch">
                        <form ng-submit="vm.doDishSearch($event)">
                            <input type="text" class="form-control" placeholder="Search" style="margin-top:8px;" ng-model="vm.search.keyWord">
                        </form>
                    </li>
        
                    <li ng-if="!globalData.loginedCustomer">
                        <a ui-sref="login">Login</a>
                    </li>

                    <li ng-if="globalData.loginedCustomer" class="dropdown">
                        <a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{globalData.loginedCustomer.cName}} <span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a ui-sref="o2o_c.orderlist">My Orders</a></li>
                            <li><a href="javascript:;" ng-click="vm.doLogout()">Logout</a></li>
                        </ul>
                    </li>
        
                </ul>
            </div><!-- /.navbar-collapse -->
        </div><!-- /.container-fluid -->
    </nav>

    <ui-view></ui-view>
</section>